﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FaultBackService.BLL
{
    static class RealTimeFaultDataFactory
    {
        public static Models.RealTimeFaultData Create(Models.RealTimeFault realFault,int faultLevel, int turbineId, string turbineName, DateTime timeStamp, float offsetPict, float turbineMean, float farmMean,int? farmMeanId)
        {
            Models.RealTimeFaultData faultData = new Models.RealTimeFaultData()
            {
                FaultId = realFault.FaultId,
                FaultDescription = realFault.FaultDescription,
                ComponentId = realFault.ComponentId,
                ComponentName = realFault.ComponentName,
                SensorId = realFault.SensorId,
                SensorZH = realFault.SensorZH,
                SensorEN = realFault.SensorEN,

                FaultLevel=faultLevel,
                TurbineId = turbineId,
                TurbineName = turbineName,
                TimeStamp = timeStamp,
                OffsetPict = offsetPict,
                TurbineMean = turbineMean,
                FarmMean = farmMean,
                FarmMeanId=farmMeanId
            };
            return faultData;
        }
    }
}
